import { fetch } from '../../../utils/util';

export type ResponseType = Promise<defs.ListResultVO<defs.MajorCategory>>;

export const URL = '/test/user/detail5';

/**
 * @desc post方法传参，类接收，requestbody注解
 */
export function request(
  bodyParams: defs.MajorCategory,
  options?: WechatMiniprogram.RequestOption,
): ResponseType {
  let url = '/test/user/detail5';

  const fetchOption = Object.assign(
    {
      url: url,
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },

      data: bodyParams,
    },
    options,
  );
  return fetch(fetchOption);
}
